package edu.towson.cosc603.coffeemaker;
//import edu.towson.cosc603.coffeemaker.CoffeeMaker;
//import edu.towson.cosc603.coffeemaker.Inventory;
//import edu.towson.cosc603.coffeemaker.Recipe;
import junit.framework.TestCase;


public class RecipeTest extends TestCase {

	    private CoffeeMaker ncm;
        private Inventory i;
        private Recipe r1;
        public Recipe r2;

	
	public void setUp() throws Exception {
		 ncm = new CoffeeMaker();
         i = ncm.checkInventory();
         r1 = new Recipe();
         r1.setName("BlackCoffee");
         r1.setPrice(30);
         r1.setAmtCoffee(2);
         r1.setAmtMilk(1);
         r1.setAmtSugar(0);
         r1.setAmtChocolate(1);
         ncm.addRecipe(r1);    
		
		super.setUp();
	}

	public void tearDown() throws Exception {
		super.tearDown();
	}

	public void testSetAmtCoffee() {
		 Recipe r2 = new Recipe();
         r2.setAmtCoffee(1);
         assertEquals(r2.getAmtCoffee(),1);
	}
	public void testSetAmtCoffee_1()
    {
            Recipe r2 = new Recipe();
            r2.setAmtCoffee(-1);
            assertEquals(r2.getAmtCoffee(),0);
    }
	
	 public void testSetAmtChocolate() {
         Recipe r2 = new Recipe();
         r2.setAmtChocolate(2);
         assertEquals(r2.getAmtChocolate(),2);
 }
	 
	 public void testSetAmtChocolate_1() {
         Recipe r2 = new Recipe();
         r2.setAmtChocolate(-2);
         assertEquals(r2.getAmtChocolate(),0);
 }
    
	public void testSetAmtMilk() {
		 Recipe r2 = new Recipe();
         r2.setAmtMilk(2);
         assertEquals(r2.getAmtMilk(),2);
	}
	public void testSetAmtMilk_1() {
		 Recipe r2 = new Recipe();
        r2.setAmtMilk(-2);
        assertEquals(r2.getAmtMilk(),0);
	}
	
	public void testSetAmtSugar() {
		Recipe r2 = new Recipe();
        r2.setAmtSugar(1);
        assertEquals(r2.getAmtSugar(),1);
	}
	public void testSetAmtSugar_1() {
		Recipe r2 = new Recipe();
        r2.setAmtSugar(-1);
        assertEquals(r2.getAmtSugar(),0);
	}
	
	public void testGetPrice() {
        assertEquals(r1.getPrice(),30);
}

	
}





